using DevExpress.XtraBars;
using Common.Class;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Common.Base
{
	public class XucBarB : XucBase
	{
		private IContainer components = null;
		private XucToolBarB ucBar;
		public event ButtonClickEventHander ExportClick;
		public event ButtonClickEventHander AddClick;
		public event ButtonClickEventHander DeleteClick;
		public event ButtonClickEventHander PrintClick;
		public event ButtonClickEventHander CloseClick;
		public event ButtonClickEventHander SaveClick;
		public event ButtonClickEventHander CancleClick;
		public event ButtonClickEventHander SaveNewClick;
		public event ButtonClickEventHander HelpClick;
		public event ButtonClickEventHander CopyClick;
		public event ButtonClickEventHander ClearClick;
		public event ButtonClickEventHander HistoryClick;
		public event ButtonClickEventHander InventoryClick;
		public event ButtonClickEventHander SelectAllClick;
		public XucToolBarB Bar
		{
			get
			{
				return this.ucBar;
			}
		}
		private void RaiseSelectAllClickEventHander()
		{
			if (this.SelectAllClick != null)
			{
				this.SelectAllClick(this);
			}
		}
		private void RaiseInventoryClickEventHander()
		{
			if (this.InventoryClick != null)
			{
				this.InventoryClick(this);
			}
		}
		private void RaiseHistoryClickEventHander()
		{
			if (this.HistoryClick != null)
			{
				this.HistoryClick(this);
			}
		}
		private void RaiseClearClickEventHander()
		{
			if (this.ClearClick != null)
			{
				this.ClearClick(this);
			}
		}
		private void RaiseCopyClickEventHander()
		{
			if (this.CopyClick != null)
			{
				this.CopyClick(this);
			}
		}
		private void RaiseHelpClickEventHander()
		{
			if (this.HelpClick != null)
			{
				this.HelpClick(this);
			}
		}
		private void RaiseAddClickEventHander()
		{
			if (this.AddClick != null)
			{
				this.AddClick(this);
			}
		}
		private void RaiseSaveClickEventHander()
		{
			if (this.SaveClick != null)
			{
				this.SaveClick(this);
			}
		}
		private void RaiseSaveNewClickEventHander()
		{
			if (this.SaveNewClick != null)
			{
				this.SaveNewClick(this);
			}
		}
		private void RaiseCancleClickEventHander()
		{
			if (this.CancleClick != null)
			{
				this.CancleClick(this);
			}
		}
		private void RaiseDeleteClickEventHander()
		{
			if (this.DeleteClick != null)
			{
				this.DeleteClick(this);
			}
		}
		private void RaisePrintClickEventHander()
		{
			if (this.PrintClick != null)
			{
				this.PrintClick(this);
			}
		}
		private void RaiseExportEventHander()
		{
			if (this.ExportClick != null)
			{
				this.ExportClick(this);
			}
		}
		public XucBarB()
		{
			this.InitializeComponent();
			this.ucBar.AddClick += new ButtonClickEventHander(this.UcToolBarAddClick);
			this.ucBar.SaveClick += new ButtonClickEventHander(this.UcToolBarSaveClick);
			this.ucBar.SaveNewClick += new ButtonClickEventHander(this.UcToolBarSaveNewClick);
			this.ucBar.CancleClick += new ButtonClickEventHander(this.UcToolBarCancleClick);
			this.ucBar.PrintClick += new ButtonClickEventHander(this.UcToolBarPrintClick);
			this.ucBar.CloseClick += new ButtonClickEventHander(this.UcToolBarCloseClick);
			this.ucBar.DeleteClick += new ButtonClickEventHander(this.UcToolBarDeleteClick);
			this.ucBar.ClearClick += new ButtonClickEventHander(this.UcToolBarClearClick);
			this.ucBar.HistoryClick += new ButtonClickEventHander(this.UcToolBarHistoryClick);
			this.ucBar.InventoryClick += new ButtonClickEventHander(this.UcToolBarInventoryClick);
			this.ucBar.SelectAllClick += new ButtonClickEventHander(this.UcToolBarSelectAllClick);
			this.ucBar.ExportClick += new ButtonClickEventHander(this.UcToolBarExportClick);
			this.ucBar.CopyClick += new ButtonClickEventHander(this.UcBarCopyClick);
			this.ucBar.HelpClick += new ButtonClickEventHander(this.UcBarHelpClick);
		}
		private void UcToolBarExportClick(object sender)
		{
			this.RaiseExportEventHander();
		}
		private void UcToolBarSelectAllClick(object sender)
		{
			this.RaiseSelectAllClickEventHander();
		}
		private void UcToolBarInventoryClick(object sender)
		{
			this.RaiseInventoryClickEventHander();
		}
		private void UcToolBarHistoryClick(object sender)
		{
			this.RaiseHistoryClickEventHander();
		}
		private void UcToolBarClearClick(object sender)
		{
			this.RaiseClearClickEventHander();
		}
		private void UcToolBarDeleteClick(object sender)
		{
			this.RaiseDeleteClickEventHander();
		}
		private void UcToolBarCloseClick(object sender)
		{
			if (base.ParentForm != null)
			{
				base.ParentForm.Close();
			}
		}
		private void UcToolBarPrintClick(object sender)
		{
			this.RaisePrintClickEventHander();
		}
		private void UcToolBarCancleClick(object sender)
		{
			this.RaiseCancleClickEventHander();
		}
		private void UcToolBarSaveNewClick(object sender)
		{
			this.RaiseSaveNewClickEventHander();
		}
		private void UcToolBarSaveClick(object sender)
		{
			this.RaiseSaveClickEventHander();
		}
		private void UcToolBarAddClick(object sender)
		{
			this.RaiseAddClickEventHander();
		}
		private void UcBarHelpClick(object sender)
		{
			this.RaiseHelpClickEventHander();
		}
		private void UcBarCopyClick(object sender)
		{
			this.RaiseCopyClickEventHander();
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.ucBar = new XucToolBarB();
			base.SuspendLayout();
			this.ucBar.ButtonAdd = BarItemVisibility.Always;
			this.ucBar.ButtonCancel = BarItemVisibility.Always;
			this.ucBar.ButtonChange = BarItemVisibility.Never;
			this.ucBar.ButtonDelete = BarItemVisibility.Always;
			this.ucBar.ButtonEdit = BarItemVisibility.Always;
			this.ucBar.ButtonExport = BarItemVisibility.Always;
			this.ucBar.ButtonPrint = BarItemVisibility.Always;
			this.ucBar.ButtonSave = BarItemVisibility.Always;
			this.ucBar.ButtonSaveNew = BarItemVisibility.Always;
			this.ucBar.Dock = DockStyle.Top;
			this.ucBar.IsClose = CloseOrNew.None;
			this.ucBar.Location = new Point(0, 0);
			this.ucBar.Name = "ucBar";
			this.ucBar.Size = new Size(583, 26);
			this.ucBar.Status = Actions.None;
			this.ucBar.TabIndex = 0;
			this.ucBar.Title = "";
			base.AutoScaleDimensions = new SizeF(6f, 13f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.Controls.Add(this.ucBar);
			this.DoubleBuffered = true;
			base.Name = "XucBarB";
			base.Size = new Size(583, 27);
			base.ResumeLayout(false);
		}
	}
}
